<?php
/**
 * The Sidebar containing the primary and secondary widget areas
 *
 * @package dkret3
 * @since 3.6
 */

if ( is_active_sidebar( 'primary-sidebar' ) ) : ?>

    <div id="primary" class="sidebar main-sidebar" role="complementary">
    
        <?php /* dkret3 Hook */ do_action( 'dkret_before_primary' ); ?>

        <?php dynamic_sidebar( 'primary-sidebar' ) ?>

        <?php /* dkret3 Hook */ do_action( 'dkret_after_primary' ); ?>
        
    </div><!-- #primary -->
    
<?php endif; ?>

<?php if ( is_active_sidebar( 'secondary-sidebar' ) ) : ?>

    <div id="secondary" class="sidebar main-sidebar" role="complementary">
    
        <?php /* dkret3 Hook */ do_action( 'dkret_before_secondary' ); ?>

        <?php dynamic_sidebar( 'secondary-sidebar' ) ?>

        <?php /* dkret3 Hook */ do_action( 'dkret_after_secondary' ); ?>
        
    </div><!-- #secondary -->
    
<?php endif; ?>

<?php if ( ! dkret_is_active_sidebars() ) : // Display Default Sidebar if no Widgets are set ?>

    <div id="primary" class="sidebar main-sidebar" role="complementary">
    
        <?php /* dkret3 Hook */ do_action( 'dkret_before_primary' ); ?>

        <?php the_widget( 'WP_Widget_Search', array( 'title' => false ) ); ?>
        <?php the_widget( 'DKRET_Widget_Sidebar_Columns' ); ?>
        <?php the_widget( 'DKRET_Widget_Meta', array( 'title' => __( 'Login/Register','dkret'), 'login' => true ) ); ?>

        <?php /* dkret3 Hook */ do_action( 'dkret_after_primary' ); ?>
        
    </div><!-- #primary -->

<?php endif; ?>